home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
optivc32
/
vemath.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-03-06
|
38KB
|
817 lines
/* VEmath.h
vector management functions:
math functions performed on each individual element of an
array or vector of the data type "extended"; real numbers
Copyright (c) 1996-1999 by Martin Sander
All Rights Reserved.
*/
#ifndef __VEMATH_H
#define __VEMATH_H
#ifndef __VESTD_H
#include <VEstd.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __BORLANDC__ /* 80-bit IEEE numbers supported.
The following 330 lines apply
only to Borland C++ */
/************************** Rounding **********************************/
int __vf VE_round( eVector Y, eVector X, ui size );
int __vf VE_roundtoBI( biVector Y, eVector X, ui size );
int __vf VE_roundtoSI( siVector Y, eVector X, ui size );
int __vf VE_roundtoI( iVector Y, eVector X, ui size );
int __vf VE_roundtoLI( liVector Y, eVector X, ui size );
int __vf VE_roundtoQI( qiVector Y, eVector X, ui size );
int __vf VE_roundtoUB( ubVector Y, eVector X, ui size );
int __vf VE_roundtoUS( usVector Y, eVector X, ui size );
int __vf VE_roundtoU( uVector Y, eVector X, ui size );
int __vf VE_roundtoUL( ulVector Y, eVector X, ui size );
int __vf VE_floor( eVector Y, eVector X, ui size );
int __vf VE_floortoBI( biVector Y, eVector X, ui size );
int __vf VE_floortoSI( siVector Y, eVector X, ui size );
int __vf VE_floortoI( iVector Y, eVector X, ui size );
int __vf VE_floortoLI( liVector Y, eVector X, ui size );
int __vf VE_floortoQI( qiVector Y, eVector X, ui size );
int __vf VE_floortoUB( ubVector Y, eVector X, ui size );
int __vf VE_floortoUS( usVector Y, eVector X, ui size );
int __vf VE_floortoU( uVector Y, eVector X, ui size );
int __vf VE_floortoUL( ulVector Y, eVector X, ui size );
int __vf VE_ceil( eVector Y, eVector X, ui size );
int __vf VE_ceiltoBI( biVector Y, eVector X, ui size );
int __vf VE_ceiltoSI( siVector Y, eVector X, ui size );
int __vf VE_ceiltoI( iVector Y, eVector X, ui size );
int __vf VE_ceiltoLI( liVector Y, eVector X, ui size );
int __vf VE_ceiltoQI( qiVector Y, eVector X, ui size );
int __vf VE_ceiltoUB( ubVector Y, eVector X, ui size );
int __vf VE_ceiltoUS( usVector Y, eVector X, ui size );
int __vf VE_ceiltoU( uVector Y, eVector X, ui size );
int __vf VE_ceiltoUL( ulVector Y, eVector X, ui size );
int __vf VE_chop( eVector Y, eVector X, ui size );
int __vf VE_choptoBI( biVector Y, eVector X, ui size );
int __vf VE_choptoSI( siVector Y, eVector X, ui size );
int __vf VE_choptoI( iVector Y, eVector X, ui size );
int __vf VE_choptoLI( liVector Y, eVector X, ui size );
int __vf VE_choptoQI( qiVector Y, eVector X, ui size );
int __vf VE_choptoUB( ubVector Y, eVector X, ui size );
int __vf VE_choptoUS( usVector Y, eVector X, ui size );
int __vf VE_choptoU( uVector Y, eVector X, ui size );
int __vf VE_choptoUL( ulVector Y, eVector X, ui size );
#define VE_trunc VE_chop
#define VE_trunctoBI VE_choptoBI
#define VE_trunctoSI VE_choptoSI
#define VE_trunctoI VE_choptoI
#define VE_trunctoLI VE_choptoLI
#define VE_trunctoQI VE_choptoQI
#define VE_trunctoUB VE_choptoUB
#define VE_trunctoUS VE_choptoUS
#define VE_trunctoU VE_choptoU
#define VE_trunctoUL VE_choptoUL
#if defined V_HUGE
#define VE_roundtoUI VE_roundtoUL
#define VE_floortoUI VE_floortoUL
#define VE_ceiltoUI VE_ceiltoUL
#define VE_choptoUI VE_choptoUL
#define VE_trunctoUI VE_trunctoUL
#else
#define VE_roundtoUI VE_roundtoU
#define VE_floortoUI VE_floortoU
#define VE_ceiltoUI VE_ceiltoU
#define VE_choptoUI VE_choptoU
#define VE_trunctoUI VE_trunctoU
#endif
/******************** Comparisons ********************/
void __vf VE_cmp0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_eq0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_ne0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_le0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_lt0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_ge0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_gt0( eVector Y, eVector X, ui size );
ui __vf VE_cmp_eq0ind( uiVector Ind, eVector X, ui size );
ui __vf VE_cmp_ne0ind( uiVector Ind, eVector X, ui size );
ui __vf VE_cmp_le0ind( uiVector Ind, eVector X, ui size );
ui __vf VE_cmp_lt0ind( uiVector Ind, eVector X, ui size );
ui __vf VE_cmp_ge0ind( uiVector Ind, eVector X, ui size );
ui __vf VE_cmp_gt0ind( uiVector Ind, eVector X, ui size );
void __vf VE_cmpC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_eqC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_neC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_leC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_ltC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_geC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_gtC( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_eqCind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_neCind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_leCind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_ltCind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_geCind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_gtCind( uiVector Ind, eVector X, ui size, extended C );
void __vf VE_cmpV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_eqV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_neV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_leV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_ltV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_geV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_gtV( eVector Z, eVector X, eVector Y, ui size );
ui __vf VE_cmp_eqVind( uiVector Ind, eVector X, eVector Y, ui size );
ui __vf VE_cmp_neVind( uiVector Ind, eVector X, eVector Y, ui size );
ui __vf VE_cmp_leVind( uiVector Ind, eVector X, eVector Y, ui size );
ui __vf VE_cmp_ltVind( uiVector Ind, eVector X, eVector Y, ui size );
ui __vf VE_cmp_geVind( uiVector Ind, eVector X, eVector Y, ui size );
ui __vf VE_cmp_gtVind( uiVector Ind, eVector X, eVector Y, ui size );
ui __vf VE_cmp_inclrange0C( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_exclrange0C( eVector Y, eVector X, ui size, extended C );
ui __vf VE_cmp_inclrangeCC( eVector Y, eVector X, ui size, extended CLo, extended CHi );
ui __vf VE_cmp_exclrangeCC( eVector Y, eVector X, ui size, extended CLo, extended CHi );
ui __vf VE_cmp_inclrange0Cind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_exclrange0Cind( uiVector Ind, eVector X, ui size, extended C );
ui __vf VE_cmp_inclrangeCCind( uiVector Ind, eVector X, ui size, extended CLo, extended CHi );
ui __vf VE_cmp_exclrangeCCind( uiVector Ind, eVector X, ui size, extended CLo, extended CHi );
/******************** Standard Arithmetics ***************************/
void __vf VE_equC( eVector X, ui size, extended C );
void __vf VE_equV( eVector Y, eVector X, ui size );
void __vf VEx_equV( eVector Y, eVector X, ui size, extended A, extended B );
void __vf VE_addC( eVector Y, eVector X, ui size, extended C );
void __vf VE_subC( eVector Y, eVector X, ui size, extended C );
void __vf VE_subrC( eVector Y, eVector X, ui size, extended C );
void __vf VE_mulC( eVector Y, eVector X, ui size, extended C );
void __vf VE_divC( eVector Y, eVector X, ui size, extended C );
void __vf VE_divrC( eVector Y, eVector X, ui size, extended C );
void __vf VEx_divrC( eVector Y, eVector X, ui size, extended A, extended B, extended C );
void __vf VE_addV( eVector Z, eVec